import sbt._
import Keys._
import play.Project._

object ApplicationBuild extends Build {

  val appName         = "mysplay"
  val appVersion      = "1.0-SNAPSHOT"

  val appDependencies = Seq(
  	"mysql" % "mysql-connector-java" % "5.1.21" % "runtime",
    "org.mybatis" % "mybatis" % "3.1.1",
    "org.mybatis" % "mybatis-spring" % "1.1.1",
    "org.springframework" % "spring-context-support" % "3.1.1.RELEASE",
    "org.springframework" % "spring-test" % "3.1.1.RELEASE" % "test",
    "cglib" % "cglib" % "2.2.2",
    "c3p0" % "c3p0" % "0.9.1.2",
    javaCore,
    javaJdbc
  )

  val main = play.Project(appName, appVersion, appDependencies).settings(
    // Add app folder as resource directory so that mapper xml files are in the classpath
  	unmanagedResourceDirectories in Compile <+= baseDirectory( _ / "app" ),
  	// but filter out java and html files that would then also be copied to the classpath
  	excludeFilter in Compile in unmanagedResources := "*.java" || "*.html"
  )

}
